The statements in this section merely provide background information related to the present disclosure and may not constitute the prior art.
Generally speaking, development of video compression technologies has established the foundation for utilizing visual media more effectively. In particular, the H.264/AVC video encoding technology shows the improved compression efficiency which is double that of existing standards. The 264/AVC video encoding technology provides an encoding process in temporal and spatial domains based on a hybrid encoding technique. In the encoding process at the temporal domain, temporal redundancy is reduced through a motion compensated prediction from an image of a reference frame. The motion compensated prediction is determined by a correlation, i.e. a motion vector, between a block of the reference frame and a block of an image to be currently encoded and a predicted image in the unit of blocks is obtained through the motion compensated prediction. Prediction errors obtained by calculating a difference between the predicted image and an original image are arranged in the unit of blocks, transformed into a frequency domain, quantized, and scanned from a coefficient indicating a DC value according to a zigzag scanning method. Through the zigzag scanning, a coefficient array is generated and a subsequent encoding process may be optimized through a Context-based Adaptive Binary Arithmetic Coding (CABAC) or a Context Adaptive Variable Length Coding (CAVLC). However, although the high encoding efficiency by the DCT transform for transforming the prediction errors into the frequency domain can be obtained only when the prediction errors within a block have correlation, i.e. exist in a low frequency band, the encoding efficiency is low when the prediction errors have a low correlation in a spatial domain.
In order to solve the above mentioned problem, there is proposed a method in which a process of encoding a prediction error in a spatial domain without performing a DCT transform is added to a conventional method of encoding a prediction error in a frequency domain, so that it can be adaptively determined whether to transform a prediction error signal into a frequency domain or maintain the prediction error signal in a spatial domain for encoding.
FIG. 1 is a flowchart illustrating a conventional method of adaptively encoding a prediction error.
First, a prediction error signal of an image to be encoded through a motion compensated prediction is obtained (S101).
A Rate-Distortion (RD) cost in a frequency domain is calculated based on distortion and a demanded rate by DCT transforming and quantizing the prediction error obtained in step S101 and inversely quantizing and DCT transforming the quantized prediction error again (S102).
A cost in a spatial domain is calculated based on the distortion and the demanded rate by quantizing the predicted error obtained in step S101 and then inversely quantizing the quantized prediction error (S103).
Finally, a prediction error signal is encoded by comparing the cost in the frequency domain calculated in step S102 and the cost in the spatial domain calculated in step S103 and selecting an encoding method requiring the lower cost (S104).
It is premised that the method as shown in FIG. 1 without the performance of the DCT transform is more effective than with the performance of the DCT transform.
The technique for encoding a prediction error signal with the method of FIG. 1 shows better encoding performance compared to that of the H.264/AVC video encoding technique. However, when there are large errors and small errors irregularly dispersed, as well as a correlation between predicted error samples within a block is low in a spatial domain, the efficiency of the aforementioned method is deteriorated.